home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Add-Ons / MicroPhone / Open Mike™ / Open Mike™ 009 / Mike's Folder / Snippet Show < prev    next >
Encoding:
Text File  |  1993-09-01  |  2.1 KB  |  19 lines  |  [TEXT/ttxt]

  1. Snippet Show
  2. ============
  3. Copyright © 1993 by Celestin Company
  4. All rights reserved.
  5.  
  6. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the publisher. However, you are permitted to make copies of this work, printed or otherwise, as long as said copies are for your personal use only.
  7.  
  8. Introduction
  9. ------------
  10. Welcome to the first Snippet Show column! This is the place to look for small but useful script examples that deal with specific problems. Each script snippet stands on its own but really becomes useful when incorporated with other scripts in a finely-tuned settings document or module. Feel free to use any of these snippets in your own creations, or modify them to suit your needs.
  11.  
  12. Snippets
  13. --------
  14. FolderExists - this snippet checks for the existence of a specified folder. If it doesn't exist, the script returns failure. Otherwise, it returns success. To use it, store the full path of the folder you want to check in a variable called "FolderExists". Then, run the "FolderExists" script. Check the success flag after running it. If the success flag is set to true, the folder exists.
  15.  
  16. PrefsWrite - this snippet writes out a list of values to a preference file stored in the Preferences folder in your System Folder. To use it, store the values you want written in an array called "Prefs". PrefsWrite will write the contents of this array to a file by the same name as the settings document, with the word "Preferences" appended to it.
  17.  
  18. PrefsRead - this snippet reads a list of values from a preference file stored in the Preference Folder in your System Folder. To use it, create a file with the same name as the settings document, with the word "Preferences" appended to it, and put it in the Preferences folder in your System Folder. The PrefsWrite snippet can do this for you. Then, when you run the "PrefsRead" script, it reads the values in the preference file and stores them in an array called "Prefs".
  19.